package com.xuecheng.api.course;

import com.xuecheng.framework.domain.cms.response.CoursePreviewResult;
import com.xuecheng.framework.domain.cms.response.SysDictionaryResult;
import com.xuecheng.framework.domain.course.CourseBase;
import com.xuecheng.framework.domain.course.CourseMarket;
import com.xuecheng.framework.domain.course.CourseView;
import com.xuecheng.framework.domain.course.Teachplan;
import com.xuecheng.framework.domain.course.ext.CategoryNode;
import com.xuecheng.framework.domain.course.ext.CourseInfo;
import com.xuecheng.framework.domain.course.ext.TeachplanNode;
import com.xuecheng.framework.domain.course.request.CourseListRequest;
import com.xuecheng.framework.domain.system.SysDictionary;
import com.xuecheng.framework.model.response.QueryResponseResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.ApiOperation;

/**
 * @author: gongfy
 * @create: 2020/7/23 10:50
 * @Description: Api工程单独定义接口 此接口编写后会在CMS服务工程编写Controller类实现此接口
 *              为什么要在api中定义接口不在cms服务中定义接口？
 *              作用：1、接口集中管理
 *                   2、Api工程的接口将作为各微服务远程调用（基于接口）使用。 本来a调用b接口需要依赖b，现在统一在api中管理，只用依赖api中就可以
 *                   3.如果不用springMVC则利于维护
 */
public interface CourseControllerApi {

    @ApiOperation(value = "课程计划查询")
    public TeachplanNode findTeachPlanList(String courseId);

    @ApiOperation("新增课程计划")
    public ResponseResult addTeachPlan(Teachplan teachplan);


    @ApiOperation(value = "课程查询分页")
    public QueryResponseResult findCourseList(int page, int size, CourseListRequest courseListRequest);

    @ApiOperation(value = "课程新增")
    public ResponseResult addCourse(CourseBase courseBase);

    @ApiOperation(value = "查询课程等级")
    public SysDictionary findCourseGrade(String dType);

    @ApiOperation(value = "课程分类查询")
    public CategoryNode findCategoryList();

    @ApiOperation(value = "根据id查询课程")
    public CourseBase findCourseBaseById(String courseId);

    @ApiOperation(value = "修改课程")
    public ResponseResult updateCoursebase(CourseBase courseBase);

    @ApiOperation("获取课程营销信息")
    public CourseMarket getCourseMarketById(String courseId);

    @ApiOperation("更新课程营销信息")
    public ResponseResult updateCourseMarket(CourseMarket courseMarket);

    @ApiOperation("课程视图查询")
    public CourseView findCourseView(String id);

    @ApiOperation("课程预览")
    public CoursePreviewResult preview(String courseId);

}
